Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Get Doc by Key
Feedback Type: Question
Product Area: Notes Client
Technical Area: Application Development
Platform: Not Applicable
Release: 8.5.2
Reproducible: Always

I am trying to build a button that finds a document by a key and will then get an item value in that document and replace it.
I am more familiar with formula and rather weak on script. So simple is better.
What I am looking to do is post the received item count to another document that is used for inventory details. However it will not be a parent child relationship.
So hit post button and it looks for a doc matching the key value then grabs the inventory count and adds it to a temp value and then replaces it with the new value.
Then resets the values and goes to look for the second document by the next item key.


Feedback number WEBB8TJ97G created by ~Chloe Minfreeskiader on 04/20/2012

Status: Closed
Comments: FYI Working code.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim lookupkey As String
Dim invcount As Long

Set uidoc = ws.currentdocument
lookupkey = uidoc.FieldGetText("POSKU")
Set db = session.CurrentDatabase
Set view = db.GetView("Inventory")
Set doc = view.GetDocumentByKey(lookupkey, True)

invcount = doc.Item_InStock(0)
invcount = invcount + Clng(uidoc.FieldGetText("POQTY_In"))
doc.Item_InStock = invcount
Call doc.Save(True, True)
End Sub

Get Doc by Key (~Chloe Minfrees... 20.Apr.12)
. . LotusScript classes? (~Anita Minaster... 20.Apr.12)
. . . . Is it possible? (~Chloe Minfrees... 20.Apr.12)
. . This should set you in the right di... (~Justin Chugero... 23.Apr.12)
. . . . That did it. Thank you! (~Chloe Minfrees... 24.Apr.12)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS